interface Shape {
        static final double PI = 3.14;
        abstract double area();
}
class Square implements Shape {
    public double width;
    public double height;

    public Square(double width, double height) {
        this.width = width;
        this.height = height;
    }
    @Override
    public double area() {
        return width*height;
    }
}
class Circle implements Shape {
    public double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double area() {
        return PI * radius * radius;
    }
}

public class Jisuan {
    public static void main(String[] args) {
        Shape square = new Square(2.0,2.0);
        Shape circle = new Circle(3.0);
        System.out.println(square.area());
        System.out.println(circle.area());
    }
}
